The alleged incident happened at a home on Wood Street in Lexington around 2 p.m.
The elementary school-aged child said they were playing when a man in all black with his face hidden by a mask grabbed her from behind and put a hand over their mouth, police said.
The kid was able to break free and run away. The suspect bolted from the area after that, police said.
Lexington police ask anyone who lives in that area who may have seen something unusual around the time to contact officers.
Click here to follow Daily Voice Dorchester and receive free news updates.